package Final;

import java.util.Scanner;

public class test20 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int c = sc.nextInt();
        Vehicle[] vs = new Vehicle[c];
        for (int i = 0; i < c; i++) {
            int type = sc.nextInt();
            Vehicle v = null;
            if (type == 1) {//货车
                vs[i] = new Truck(sc.nextDouble());
            } else if (type == 2) {
                vs[i] = new Keche(sc.nextInt());
            } else if (type == 3) {
                vs[i] = new Car(sc.nextInt(), sc.nextInt());
            }
        }

        System.out.printf("%.2f", CarRentCompany.rentVehicles(vs));

    }
}

/* 你的代码被嵌在这里 */
abstract class Vehicle {
    abstract double money();
}

class Car extends Vehicle {
    private int level;
    private int year;

    public Car(int level, int year) {
        this.level = level;
        this.year = year;
    }

    double money() {
        return 1.0 * 200 * level / Math.sqrt(year);
    }
}

class Truck extends Vehicle {
    private double load;

    public Truck(double load) {
        this.load = load;
    }

    double money() {
        return 1.0*load * 1000;
    }
}

class Keche extends Vehicle {
    private int seat;

    public Keche(int seat) {
        this.seat = seat;
    }

    double money() {
        return seat * 50;
    }
}

class CarRentCompany {
    public static double rentVehicles(Vehicle[] vs) {
        double sum = 0;
        for (int i = 0; i < vs.length; i++) {
            sum += vs[i].money();
        }
        return sum;
    }
}
